<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile" contentType="text/html"
	renderKitId="PRIMEFACES_MOBILE">

	<pm:page title="Components">

		<style>
.th-groups th {
	text-align: center;
	background-color: rgba(0, 0, 0, .1);
	border-right: 1px solid #fff;
}

.ui-li-custom .ui-li-count {
	right: 10px !important;
}
</style>

 <f:facet name="postinit">            
            <link rel="stylesheet" href="#{request.contextPath}/javax.faces.resource/calendar/calendar.css.jsf?ln=primefaces-mobile" />
            <h:outputScript library="primefaces-mobile" name="calendar/calendar.js" />            

        </f:facet>   


		<pm:view id="admin">
			<pm:header title="Drop File">
				<pm:navBar>
				<p:button value="Send" icon="home" href="send-message.jsf?reverse=true" />
					<p:button value="My Files" icon="info" href="myfiles.jsf?reverse=true" />
					<p:button value="Admin" icon="search" href="admin.jsf?reverse=true" styleClass="ui-btn-active ui-state-persist" />
				</pm:navBar>

			</pm:header>

			<pm:content>
				<h:form id="adminReadOnlyForm">
					
					
					<p:panel header="My Account" collapsed="true">

						<h:panelGrid columns="2" border="0" cellpadding="0"
							cellspacing="0">
							<h:outputText value="Name:" />
							<h:outputText id="name" value="#{dropFileAdmin.name}" />

							<h:outputText value="Surname:" />
							<h:outputText id="surname" value="#{dropFileAdmin.surname}" />

							<h:outputText value="Email:" />
							<h:outputText id="email" value="#{dropFileAdmin.email}" />
						</h:panelGrid>


					</p:panel>
					<p:panel header="Configuration" collapsed="true">

						<h:panelGrid columns="2" border="0" cellpadding="0"
							cellspacing="0">
							<h:outputText value="Default expiry date:" />
							<h:outputText id="expDate"
								value="#{dropFileAdmin.formattedExpiryDate}">
							</h:outputText>
						</h:panelGrid>

						<p:selectBooleanCheckbox disabled="true" id="returnRecipt"
							value="#{dropFileAdmin.returnRecipt}" itemLabel="Return Recipt" />

						<p:selectBooleanCheckbox disabled="true" id="deleteAfterDownload"
							value="#{dropFileAdmin.deleteAfterDownload}"
							itemLabel="Delete After Download" />
						<p:selectBooleanCheckbox disabled="true" id="public"
							value="#{dropFileAdmin.public}" itemLabel="Public" />


					</p:panel>
					<p:button value="Change options" href="#adminEdit?transition=turn">

					</p:button>
				</h:form>
			</pm:content>

		</pm:view>

		<pm:view id="adminEdit">
			<pm:header title="Drop File">
				<f:facet name="left"><p:button value="Back" icon="back" onclick="PrimeFaces.back()" /></f:facet>
				<pm:navBar>
					<p:button value="Send" icon="home" href="send-message.jsf?reverse=true" />
					<p:button value="My Files" icon="info" href="myfiles.jsf?reverse=true" />
					<p:button value="Admin" icon="search" href="admin.jsf?reverse=true" styleClass="ui-btn-active ui-state-persist" />
				</pm:navBar>

			</pm:header>

			<pm:content>
				<h:form id="adminForm">

					<p:growl id="globalErrorMessages" />

					<p:panel header="My Account" collapsed="false" required="true">
						<p:inputText label="Name:" value="#{dropFileAdmin.name}"
							required="true" />
						<p:inputText label="Surname:" value="#{dropFileAdmin.surname}"
							required="true" />
						<p:inputText label="Email:" value="#{dropFileAdmin.email}"
							required="true" />
					</p:panel>
					<p:panel header="Configuration" collapsed="false">
						<label for="expDate">Expiry date: </label>
						<p:calendar id="expDate"
							value="#{dropFileAdmin.defaultExpiryDate}"
							mindate="#{dropFileAdmin.minExpiryDate}" />

						<p:selectBooleanCheckbox id="returnRecipt"
							value="#{dropFileAdmin.returnRecipt}" itemLabel="Return Recipt" />

						<p:selectBooleanCheckbox id="deleteAfterDownload"
							value="#{dropFileAdmin.deleteAfterDownload}"
							itemLabel="Delete After Download" />
						<p:selectBooleanCheckbox id="public"
							value="#{dropFileAdmin.public}" itemLabel="Public" />

					</p:panel>

					<p:commandButton value="Update" icon="refresh"
						update="globalErrorMessages :adminReadOnlyForm" process="@form"
						actionListener="#{dropFileAdmin.update}">
						<f:attribute name="swatch" value="e" />
					</p:commandButton>

				</h:form>
			</pm:content>

		</pm:view>

		


	</pm:page>

</f:view>
